package com.wzy.mall.service.client.impl;

import com.wzy.mall.mapper.clientMapper.IndexMapper;
import com.wzy.mall.model.vo.clientVO.IndexGoodsVO;
import com.wzy.mall.model.vo.clientVO.TypeVO;
import com.wzy.mall.service.client.IndexService;
import com.wzy.mall.utils.MybatisUtils;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class IndexServiceImpl implements IndexService {


    public List<TypeVO> getType() {
        SqlSession sqlSession = MybatisUtils.getSqlSession();
        IndexMapper mapper = sqlSession.getMapper(IndexMapper.class);

        List<TypeVO> typeVOList = null;
        try {
            typeVOList = mapper.getType();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            sqlSession.close();
        }

        return typeVOList;
    }

}
